
package com.sky.controller.user;
import com.sky.result.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import static com.sky.controller.admin.ShopController.KEY;

@RestController("userShopController")
@RequestMapping("/user/shop")
@Slf4j
public class ShopController {


    @Autowired
    private RedisTemplate redisTemplate;


    /**
     * 查看店铺状态
     * @param
     * @return
     */
    @GetMapping("/status")
    public Result<Integer> shopStatusBack(){
        Integer status = (Integer) redisTemplate.opsForValue().get(KEY);
        return Result.success(status);
    }

}

